Integrand size = 31, antiderivative size = 183 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \text {arctanh}(\sin (e+f x))}{2 a f}-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f} \]
[Out]
Time = 0.35 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {4072, 100, 158, 152, 65, 223, 209} \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}-\frac {d \tan (e+f x) \left (d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)+4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )\right )}{6 a f}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^3}{f (a \sec (e+f x)+a)}-\frac {d (3 c-4 d) \tan (e+f x) (c+d \sec (e+f x))^2}{3 a f} \]
[In]
[Out]
Rule 65
Rule 100
Rule 152
Rule 158
Rule 209
Rule 223
Rule 4072
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(c+d x)^4}{\sqrt {a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x)^2 \left (-a^2 (4 c-3 d) d+a^2 (3 c-4 d) d x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x) \left (a^4 d \left (12 c^2-15 c d+8 d^2\right )-a^4 d \left (6 c^2-20 c d+9 d^2\right ) x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{3 a^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}-\frac {\left (a d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}+\frac {\left (d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}+\frac {\left (d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(1243\) vs. \(2(183)=366\).
Time = 7.85 (sec) , antiderivative size = 1243, normalized size of antiderivative = 6.79 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {\left (-8 c^3 d+12 c^2 d^2-12 c d^3+3 d^4\right ) \cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) (c+d \sec (e+f x))^4}{f (d+c \cos (e+f x))^4 (a+a \sec (e+f x))}+\frac {\left (8 c^3 d-12 c^2 d^2+12 c d^3-3 d^4\right ) \cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \cos ^3(e+f x) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) (c+d \sec (e+f x))^4}{f (d+c \cos (e+f x))^4 (a+a \sec (e+f x))}+\frac {\cos \left (\frac {e}{2}+\frac {f x}{2}\right ) \sec \left (\frac {e}{2}\right ) \sec (e) (c+d \sec (e+f x))^4 \left (-18 c^4 \sin \left (\frac {f x}{2}\right )+72 c^3 d \sin \left (\frac {f x}{2}\right )-36 c^2 d^2 \sin \left (\frac {f x}{2}\right )+24 c d^3 \sin \left (\frac {f x}{2}\right )+6 d^4 \sin \left (\frac {f x}{2}\right )+18 c^4 \sin \left (\frac {3 f x}{2}\right )-72 c^3 d \sin \left (\frac {3 f x}{2}\right )+180 c^2 d^2 \sin \left (\frac {3 f x}{2}\right )-108 c d^3 \sin \left (\frac {3 f x}{2}\right )+39 d^4 \sin \left (\frac {3 f x}{2}\right )-72 c^2 d^2 \sin \left (e-\frac {f x}{2}\right )+48 c d^3 \sin \left (e-\frac {f x}{2}\right )-24 d^4 \sin \left (e-\frac {f x}{2}\right )-36 c^2 d^2 \sin \left (e+\frac {f x}{2}\right )+24 c d^3 \sin \left (e+\frac {f x}{2}\right )-6 d^4 \sin \left (e+\frac {f x}{2}\right )-18 c^4 \sin \left (2 e+\frac {f x}{2}\right )+72 c^3 d \sin \left (2 e+\frac {f x}{2}\right )-144 c^2 d^2 \sin \left (2 e+\frac {f x}{2}\right )+96 c d^3 \sin \left (2 e+\frac {f x}{2}\right )-24 d^4 \sin \left (2 e+\frac {f x}{2}\right )+72 c^2 d^2 \sin \left (e+\frac {3 f x}{2}\right )-36 c d^3 \sin \left (e+\frac {3 f x}{2}\right )+21 d^4 \sin \left (e+\frac {3 f x}{2}\right )+18 c^4 \sin \left (2 e+\frac {3 f x}{2}\right )-72 c^3 d \sin \left (2 e+\frac {3 f x}{2}\right )+72 c^2 d^2 \sin \left (2 e+\frac {3 f x}{2}\right )-36 c d^3 \sin \left (2 e+\frac {3 f x}{2}\right )+9 d^4 \sin \left (2 e+\frac {3 f x}{2}\right )-36 c^2 d^2 \sin \left (3 e+\frac {3 f x}{2}\right )+36 c d^3 \sin \left (3 e+\frac {3 f x}{2}\right )-9 d^4 \sin \left (3 e+\frac {3 f x}{2}\right )+36 c^2 d^2 \sin \left (e+\frac {5 f x}{2}\right )-12 c d^3 \sin \left (e+\frac {5 f x}{2}\right )+7 d^4 \sin \left (e+\frac {5 f x}{2}\right )-6 c^4 \sin \left (2 e+\frac {5 f x}{2}\right )+24 c^3 d \sin \left (2 e+\frac {5 f x}{2}\right )+12 c d^3 \sin \left (2 e+\frac {5 f x}{2}\right )+d^4 \sin \left (2 e+\frac {5 f x}{2}\right )+12 c d^3 \sin \left (3 e+\frac {5 f x}{2}\right )-3 d^4 \sin \left (3 e+\frac {5 f x}{2}\right )-6 c^4 \sin \left (4 e+\frac {5 f x}{2}\right )+24 c^3 d \sin \left (4 e+\frac {5 f x}{2}\right )-36 c^2 d^2 \sin \left (4 e+\frac {5 f x}{2}\right )+36 c d^3 \sin \left (4 e+\frac {5 f x}{2}\right )-9 d^4 \sin \left (4 e+\frac {5 f x}{2}\right )+6 c^4 \sin \left (2 e+\frac {7 f x}{2}\right )-24 c^3 d \sin \left (2 e+\frac {7 f x}{2}\right )+72 c^2 d^2 \sin \left (2 e+\frac {7 f x}{2}\right )-48 c d^3 \sin \left (2 e+\frac {7 f x}{2}\right )+16 d^4 \sin \left (2 e+\frac {7 f x}{2}\right )+36 c^2 d^2 \sin \left (3 e+\frac {7 f x}{2}\right )-24 c d^3 \sin \left (3 e+\frac {7 f x}{2}\right )+10 d^4 \sin \left (3 e+\frac {7 f x}{2}\right )+6 c^4 \sin \left (4 e+\frac {7 f x}{2}\right )-24 c^3 d \sin \left (4 e+\frac {7 f x}{2}\right )+36 c^2 d^2 \sin \left (4 e+\frac {7 f x}{2}\right )-24 c d^3 \sin \left (4 e+\frac {7 f x}{2}\right )+6 d^4 \sin \left (4 e+\frac {7 f x}{2}\right )\right )}{48 f (d+c \cos (e+f x))^4 (a+a \sec (e+f x))} \]
[In]
[Out]
Time = 0.97 (sec) , antiderivative size = 275, normalized size of antiderivative = 1.50
method | result | size |
parallelrisch | \(\frac {-12 \left (c^{3}-\frac {3}{2} c^{2} d +\frac {3}{2} c \,d^{2}-\frac {3}{8} d^{3}\right ) \left (\cos \left (f x +e \right )+\frac {\cos \left (3 f x +3 e \right )}{3}\right ) d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+12 \left (c^{3}-\frac {3}{2} c^{2} d +\frac {3}{2} c \,d^{2}-\frac {3}{8} d^{3}\right ) \left (\cos \left (f x +e \right )+\frac {\cos \left (3 f x +3 e \right )}{3}\right ) d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\left (\frac {1}{3} c^{4}-\frac {4}{3} c^{3} d +4 c^{2} d^{2}-\frac {8}{3} c \,d^{3}+\frac {8}{9} d^{4}\right ) \cos \left (3 f x +3 e \right )+\left (4 c^{2} d^{2}-\frac {4}{3} c \,d^{3}+\frac {7}{9} d^{4}\right ) \cos \left (2 f x +2 e \right )+\left (c^{4}-4 c^{3} d +12 c^{2} d^{2}-\frac {16}{3} c \,d^{3}+\frac {22}{9} d^{4}\right ) \cos \left (f x +e \right )+4 c^{2} d^{2}-\frac {4 c \,d^{3}}{3}+\frac {11 d^{4}}{9}\right )}{a f \left (\cos \left (3 f x +3 e \right )+3 \cos \left (f x +e \right )\right )}\) | \(275\) |
derivativedivides | \(\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{4}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{3} d +6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{2} d^{2}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{3}+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{4}-\frac {d^{4}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}-\frac {d^{2} \left (12 c^{2}-12 c d +5 d^{2}\right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {d^{3} \left (2 c -d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {d^{4}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}-\frac {d^{2} \left (12 c^{2}-12 c d +5 d^{2}\right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {d^{3} \left (2 c -d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}{f a}\) | \(309\) |
default | \(\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{4}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{3} d +6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{2} d^{2}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{3}+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{4}-\frac {d^{4}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}-\frac {d^{2} \left (12 c^{2}-12 c d +5 d^{2}\right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {d^{3} \left (2 c -d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {d^{4}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}-\frac {d^{2} \left (12 c^{2}-12 c d +5 d^{2}\right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {d^{3} \left (2 c -d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}{f a}\) | \(309\) |
norman | \(\frac {\frac {\left (c^{4}-4 c^{3} d +6 c^{2} d^{2}-4 c \,d^{3}+d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{a f}+\frac {\left (c^{4}-4 c^{3} d +18 c^{2} d^{2}-8 c \,d^{3}+4 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}-\frac {\left (4 c^{4}-16 c^{3} d +36 c^{2} d^{2}-28 c \,d^{3}+9 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}-\frac {\left (12 c^{4}-48 c^{3} d +180 c^{2} d^{2}-108 c \,d^{3}+37 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 a f}+\frac {\left (18 c^{4}-72 c^{3} d +216 c^{2} d^{2}-156 c \,d^{3}+49 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{3 a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{4}}-\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 a f}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 a f}\) | \(347\) |
risch | \(\frac {i \left (36 c^{2} d^{2} {\mathrm e}^{6 i \left (f x +e \right )}+144 c^{2} d^{2} {\mathrm e}^{4 i \left (f x +e \right )}-108 c \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}-72 c^{3} d \,{\mathrm e}^{2 i \left (f x +e \right )}-24 c^{3} d \,{\mathrm e}^{6 i \left (f x +e \right )}-36 c \,d^{3} {\mathrm e}^{5 i \left (f x +e \right )}-96 c \,d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+36 c^{2} d^{2} {\mathrm e}^{i \left (f x +e \right )}-12 c \,d^{3} {\mathrm e}^{i \left (f x +e \right )}-36 c \,d^{3} {\mathrm e}^{6 i \left (f x +e \right )}-72 c^{3} d \,{\mathrm e}^{4 i \left (f x +e \right )}+36 c^{2} d^{2} {\mathrm e}^{5 i \left (f x +e \right )}+72 c^{2} d^{2} {\mathrm e}^{3 i \left (f x +e \right )}-48 c \,d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+180 c^{2} d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+16 d^{4}+6 c^{4}+9 d^{4} {\mathrm e}^{5 i \left (f x +e \right )}+7 d^{4} {\mathrm e}^{i \left (f x +e \right )}+39 d^{4} {\mathrm e}^{2 i \left (f x +e \right )}+6 c^{4} {\mathrm e}^{6 i \left (f x +e \right )}+24 d^{4} {\mathrm e}^{3 i \left (f x +e \right )}+24 d^{4} {\mathrm e}^{4 i \left (f x +e \right )}+9 d^{4} {\mathrm e}^{6 i \left (f x +e \right )}+18 c^{4} {\mathrm e}^{2 i \left (f x +e \right )}+18 c^{4} {\mathrm e}^{4 i \left (f x +e \right )}-24 c^{3} d +72 c^{2} d^{2}-48 c \,d^{3}\right )}{3 f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{3}}-\frac {4 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c^{3}}{a f}+\frac {6 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c^{2}}{a f}-\frac {6 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c}{a f}+\frac {3 d^{4} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{2 a f}+\frac {4 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c^{3}}{a f}-\frac {6 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c^{2}}{a f}+\frac {6 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c}{a f}-\frac {3 d^{4} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{2 a f}\) | \(633\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.62 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {3 \, {\left ({\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{4} + {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left ({\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{4} + {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (2 \, d^{4} + 2 \, {\left (3 \, c^{4} - 12 \, c^{3} d + 36 \, c^{2} d^{2} - 24 \, c d^{3} + 8 \, d^{4}\right )} \cos \left (f x + e\right )^{3} + {\left (36 \, c^{2} d^{2} - 12 \, c d^{3} + 7 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (12 \, c d^{3} - d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{12 \, {\left (a f \cos \left (f x + e\right )^{4} + a f \cos \left (f x + e\right )^{3}\right )}} \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {c^{4} \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{4} \sec ^{5}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {4 c d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {6 c^{2} d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {4 c^{3} d \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 596 vs. \(2 (174) = 348\).
Time = 0.22 (sec) , antiderivative size = 596, normalized size of antiderivative = 3.26 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {d^{4} {\left (\frac {2 \, {\left (\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {16 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a - \frac {3 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {a \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}}} - \frac {9 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {9 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {6 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 12 \, c d^{3} {\left (\frac {2 \, {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 36 \, c^{2} d^{2} {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (f x + e\right )}{{\left (a - \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + 24 \, c^{3} d {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + \frac {6 \, c^{4} \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{6 \, f} \]
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 344, normalized size of antiderivative = 1.88 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {\frac {3 \, {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac {3 \, {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac {6 \, {\left (c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 4 \, c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 6 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 4 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a} - \frac {2 \, {\left (36 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 36 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 15 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 72 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 48 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 16 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 36 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 12 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 9 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{3} a}}{6 \, f} \]
[In]
[Out]
Time = 14.17 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.15 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx=\frac {\left (12\,c^2\,d^2-12\,c\,d^3+5\,d^4\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-24\,c^2\,d^2+16\,c\,d^3-\frac {16\,d^4}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (12\,c^2\,d^2-4\,c\,d^3+3\,d^4\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (-a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\right )}+\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\left (c-d\right )}^4}{a\,f}+\frac {d\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (8\,c^3-12\,c^2\,d+12\,c\,d^2-3\,d^3\right )}{a\,f} \]
[In]
[Out]